﻿namespace WizardEngine.Core.Specification
{
    /// <summary>
    /// Definition of wizard flow used for final wizard creation. 
    /// </summary>
    /// <remarks>
    /// Specification objects can be resused to create several wizards. You can even extend and
    /// modify the already used specification as wizards do copy everything they need for further operation 
    /// from the specification object during registration time. 
    /// </remarks>
    public interface IFlowSpecification<T> : IStepBinder<T> where T : FlowState, new()
    {
        /// <summary>
        /// Registers new step specification under the specification.
        /// </summary>
        /// <param name="stepName">Unique name identifing the step. </param>
        /// <returns>Step specification ready for further configuration. </returns>
        IStepSpecification<T> RegisterStep(string stepName);
        
        /// <summary>
        /// Indicates whether current flow specification is correct. 
        /// </summary>
        bool IsValid
        {
            get;
        }
    }
}